﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

//自定义命名空间
using DreamCube.Apps.Common.WinForm.Controls.Progress;

namespace Test.UI
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            BindEvent();
        }

        private void BindEvent()
        {
            this.Load += new EventHandler(Form1_Load);
        }

        /// <summary>
        /// 窗体加载的时候触发事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void Form1_Load(object sender, EventArgs e)
        {
            TestProgressBar();
        }

        /// <summary>
        /// 启动进度条
        /// </summary>
        private void TestProgressBar()
        {
            //ProgressBarHelper.StartBar(progressBar1);
            //ProgressBarHelper.StartBar(progressBar2, 20);
            ProgressBarHelper.StartBar(progressBar3, 30);
        }

        /// <summary>
        /// 重置滚动条3
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            ProgressBarHelper.ResetBar(progressBar3, 10);
        }
    }
}
